<?php

class programa extends object_standard {

    protected $id;
    protected $nombre;
    protected $fecha_modificacion;
    protected $estado_requisito;   
    protected $fecha_envio;
    protected $funcionalidad;
    protected $codigo_fuente;
    protected $modulo;  
    protected $programador; 
    var $components = array();
    var $auxiliars = array();

    public function attributes() {
        return array("id" => array(), "nombre" => array(),   
           "fecha_modificacion"=> array(),
            "estado_requisito"=> array(),"fecha_envio"=> array(),
           "funcionalidad"=> array(),"codigo_fuente"=> array() ,"modulo" => array("foreign_name" => "m_p", "foreign" => "modulo", "foreign_attribute" => "id"),
             "programador" => array("foreign_name" => "p_p", "foreign" => "programador", "foreign_attribute" => "usuario"));
    }

    public function primary_key() {
        return array("id");
    }

   
    public function relational_keys($class, $rel_name) {
        switch ($class) {
            case "modulo":
                switch ($rel_name) {
                    case "m_p":
                        return array("modulo");
                        break;
            }
                
                
            case "programador":
                switch ($rel_name) {
                    case "p_p":
                        return array("programador");
                        break;
            }    
            default:
                break;
        }
    }


}

?>